Closed-loop FiO2 controller